package cn.ococci.dm.Main.Model;


import cn.ococci.dm.Main.Tools.DbTool;

/**
 * Created by cyan on 15/9/22.
 * 当前操作用户
 */
public class CurUser {

    public static User curUser;

    /**
     * 初始化用户，从数据库中获取
     */
    public static void init() {
        curUser = DbTool.getCurUser();
    }

    public static void clear(){
        curUser = null;
    }


    public static long getServerId() {
        return curUser.getServerId();
    }

    public static long getLocalId(){
        return curUser.getId();
    }


    public static String getName() {
        return curUser.getName();
    }


    public static String getPhone() {
        return curUser.getPhone();
    }


    public static String getCompany() {
        return curUser.getCompany();
    }



    public static int getRoleType() {
        return curUser.getRoleType();
    }



    public static String getAvatar() {
        return curUser.getAvatar();
    }


    public static int getGender() {
        return curUser.getGender();
    }


    public static String getPhoneMacId() {
        return curUser.getPhoneMacId();
    }


    public static long getCompanyId(){
        return curUser.getCompanyId();
    }


    public static  int getCardNumber(){

        return curUser.getCardNumber();
    }


    public static int getCardType(){

        return curUser.getCardType();

    }




}
